package com.zhu.rpc;


import java.util.ArrayList;
import java.util.LinkedList;
import java.util.concurrent.ConcurrentHashMap;

public class Test {
    public static void main(String[] args) throws NoSuchMethodException {
//        long oldTime = System.nanoTime();
//        ope2();
//        System.out.println("ArrayList耗时："+(System.nanoTime()-oldTime));
//        oldTime = System.nanoTime();
//        ope1();
//        System.out.println("LinkList耗时： "+(System.nanoTime()-oldTime));
        System.out.println(32 <<5);
        LinkedList<Integer> linkedList = new LinkedList<>();
        linkedList.add(1);
        linkedList.add(2);
        linkedList.add(3);
        linkedList.add(4);
        linkedList.add(5);
        System.out.println(linkedList);
        linkedList.removeFirst();
        System.out.println(linkedList);

    }
    private static void ope1(){
        LinkedList<Integer> linkedList = new LinkedList<>();
        for (int i = 1000000; i < 2000000; i++) {
            linkedList.add(i);
        }

        for (Integer p:linkedList) {
            p++;
        }
    }

    private static void ope2(){
        ArrayList<Integer> arrayList = new ArrayList<>();
        for (int i = 2000000; i < 3000000; i++) {
            arrayList.add(i);
        }

        for (Integer p:arrayList) {
            p++;
        }
    }


}
